/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "contabil_lote")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ContabilLote.findAll", query = "SELECT c FROM ContabilLote c")})
public class ContabilLote implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(length = 100)
    private String descricao;
    private Character liberado;
    @Column(name = "DATA_INCLUSAO")
    @Temporal(TemporalType.DATE)
    private Date dataInclusao;
    @Column(name = "DATA_LIBERACAO")
    @Temporal(TemporalType.DATE)
    private Date dataLiberacao;
    private Character programado;
    @OneToMany(mappedBy = "idContabilLote")
    private List<ContabilLancaProgramadoCab> contabilLancaProgramadoCabList;
    @OneToMany(mappedBy = "idContabilLote")
    private List<ContabilLancamentoCabecalho> contabilLancamentoCabecalhoList;

    public ContabilLote() {
    }

    public ContabilLote(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public Character getLiberado() {
        return liberado;
    }

    public void setLiberado(Character liberado) {
        this.liberado = liberado;
    }

    public Date getDataInclusao() {
        return dataInclusao;
    }

    public void setDataInclusao(Date dataInclusao) {
        this.dataInclusao = dataInclusao;
    }

    public Date getDataLiberacao() {
        return dataLiberacao;
    }

    public void setDataLiberacao(Date dataLiberacao) {
        this.dataLiberacao = dataLiberacao;
    }

    public Character getProgramado() {
        return programado;
    }

    public void setProgramado(Character programado) {
        this.programado = programado;
    }

    @XmlTransient
    public List<ContabilLancaProgramadoCab> getContabilLancaProgramadoCabList() {
        return contabilLancaProgramadoCabList;
    }

    public void setContabilLancaProgramadoCabList(List<ContabilLancaProgramadoCab> contabilLancaProgramadoCabList) {
        this.contabilLancaProgramadoCabList = contabilLancaProgramadoCabList;
    }

    @XmlTransient
    public List<ContabilLancamentoCabecalho> getContabilLancamentoCabecalhoList() {
        return contabilLancamentoCabecalhoList;
    }

    public void setContabilLancamentoCabecalhoList(List<ContabilLancamentoCabecalho> contabilLancamentoCabecalhoList) {
        this.contabilLancamentoCabecalhoList = contabilLancamentoCabecalhoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ContabilLote)) {
            return false;
        }
        ContabilLote other = (ContabilLote) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.ContabilLote[ id=" + id + " ]";
    }
    
}
